package cn.kclm.service;

import cn.kclm.dao.StudentDao;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author : lvhx
 * @Date: 2025/11/4 14:12
 * @Description:
 * @Resource 默认是名字注入的 name没有给 把属性名当做bean的名字查找，如果没有没有找到 就按照类型注入
 */
@Service
public class StudentService {
    @Resource(name="studentDao02")
    private StudentDao studentDao;

////    @Resource
//    public void setStudentDao(StudentDao studentDao) {
//        this.studentDao = studentDao;
//    }



    public  void save(){
        studentDao.insert();
    }
}
